-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: lazy-load items #3
base: master
Are you sure you want to change the base?
Conversation
Question: does it make sense to lazy-load layouts? I don’t think it does, given that a site will have a handful of layouts at most. |
CC @RubenVerborgh — this is the RFC you are looking for (still quite WIP though). The idea you brought up is described in the “alternatives” section. |
9c2972b
to
3dc706a
Compare
3dc706a
to
5816096
Compare
Would it make sense to make compilation speed part of the motivation? It makes a major difference for my use case (BibTeX datasource). Not tested yet with other datasources.
The content needs to be loaded indeed, but not the attributes since nanoc/nanoc#793. |
I’d welcome a PR to make attribute loading lazy! My idea would be to allow |
That would indeed be cool. Would it make sense to do the same with |
Hmm, not sure. The content will be loaded anyway (for the checksum) so lazy-loading it likely won’t make a difference. I’d say “no” and go for attributes only (to eliminate the YAML parsing overhead). |
Okay, I'll proceed with I do a have use case for lazy For the sake of discussion, here is a brief sketch of how the BibTeX datasource works: The two last steps take 33% of my compilation time. |
In that case, it makes sense for content to be (optionally) lazy too. 👍 for lazifying both content and attributes. |
Is there any progress on this? I'm currently working on adding "versions" to GitLab's documentation website and it's causing some issues with compile time (e.g. going from 4 unique sets of documentation to 8 is causing the compile time to grow from 4 minutes to 13), I suspect in part due to the problems described here. Running
|
Hm, upon further testing it seems that much of the time is taken because Nanoc is comparing the older version of the site to see what it should recompile. For our repo: This doesn't really explain why it's taking an unholy amount of time ( |
@connorshea Are you on the latest version of Nanoc? There have been some performance issues recently, which have all been fixed. (Ironically, a recent optimisation made things far worse in terms of compilation speed.) |
@ddfreyne was on 4.4.2 for One thing I just realized for the test wherein it takes 789.85s is that the public and tmp folders had content from |
As for the state of the RFC: it’s work in progress and blocked by having a redesigned preprocessor. The preprocessor as it stands now is a bottleneck to future optimisations in terms of CPU and RAM usage, as it’s a black box where anything can happen, and its effects cannot be analysed. This means that unless the preprocessor is replaced with something smarter, Nanoc will have to keep loading all items into memory. |
383.98s on 4.4.2, so the same. |
@connorshea Interesting… Nanoc 4.3.8 fixed the last known performance issue, so it might be related to having more content in the |
@ddfreyne Yup: https://gitlab.com/gitlab-com/gitlab-docs/ It's a bit odd in that it doesn't have most of the content in Here's pretty much what you need to run to test this:
|
@connorshea I’d prefer not to pollute the discussion of this PR here. Shall we move the conversation to the Google group or Gitter? |
@ddfreyne of course, here's a Google Group thread: https://groups.google.com/forum/#!topic/nanoc/4iLK826kO7A |
rendered view
The implementation of this RFC depends on not having a preprocessor, or having a preprocessor whose effects can be analysed. Work on such a preprocessor is pending (see #7).